package app.ep1.seminarios;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import app.ep1.R;

public class SeminariosActivity extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.nome_seminario);

		Button confirma = (Button) findViewById(R.id.buttonConfirmaSeminarios);
		confirma.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				EditText editText = (EditText) findViewById(R.id.editTextNomeDoSeminario);

				String nome = editText.getText().toString();

				Bundle bundle = new Bundle();
				bundle.putString("nomeSeminario", nome);

				Intent i = new Intent(v.getContext(),
						ListaAlunosSeminarioActivity.class);
				i.putExtras(bundle);
				v.getContext().startActivity(i);
			}
		});
	}
}
